<?php

if(!empty($_POST))
{
	$dst = upload($_FILES['file']);
	$src = upload($_FILES['img']);
	$waterimg = imagewater($src,$dst);
	$_POST['file'] = $waterimg;
	$_POST['img'] = $src;
	$re = insert('waterimg', $_POST);
	if($re)
	{
		echo '添加成功';
		header('Refresh:1;index.php?a=admin&b=waterimg&c=index');
		die;
	}
	else
	{
		echo '添加失败';
		header('Refresh:1;index.php?a=admin&b=waterimg&c=add');
		die;
	}	
}




include('app/admin/waterimg/html/add.html');
?>